#ifndef INCRUSTATION_HH_
# define INCRUSTATION_HH_

# include "cv.h"
# include "highgui.h"
# include "tbb/blocked_range2d.h"
# include "tbb/parallel_for.h"

class ApplyIncrustation {
  IplImage* input1;
  IplImage* input2;

  unsigned r;
  unsigned g;
  unsigned b;

  unsigned error;

  IplImage* output;

public:
  ApplyIncrustation(IplImage* input1,
		    IplImage* input2,
		    unsigned r,
		    unsigned g,
		    unsigned b,
		    unsigned error);

  void operator()(const tbb::blocked_range2d<int>& r) const;

  IplImage* getOutput();
};

IplImage*
incrustation(IplImage* input1,
	     IplImage* input2,
	     unsigned r,
	     unsigned g,
	     unsigned b,
	     unsigned error);

#endif
